﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Topro.Application.Interface
{
    using Topro.Entity;
    using Topro.Entity.Query;
    using Topro.Entity.Request.Inventory;
    using Topro.Entity.Response.Inventory;

    /// <summary>
    /// 库存业务接口
    /// </summary>
    public interface InventoryService
    {
        /// <summary>
        /// 获取物料
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns></returns>
        InventoryResponse Get(int? id);

        /// <summary>
        /// 保存、修改
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        JResult Save(SaveInventoryRequest request);

        /// <summary>
        /// 入库查询
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        DataGrid<InventoryQueryResponse> StockInQuery(InventoryQuery query);

        /// <summary>
        /// 出库查询
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        DataGrid<InventoryQueryResponse> StockOutQuery(InventoryQuery query);

        /// <summary>
        /// 库存查询
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        DataGrid<InventoryQueryResponse> InventoryQuery(InventoryQuery query);

        /// <summary>
        /// 报表库存查询
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        DataGrid<InventoryQueryResponse> ReportInventoryQuery(InventoryQuery query);

        /// <summary>
        /// 导出库存查询
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        List<InventoryQueryResponse> ExportInventoryQuery(InventoryQuery query);

        /// <summary>
        /// 导出库存查询
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        List<InventoryQueryResponse> ExportReportQuery(InventoryQuery query);

        /// <summary>
        /// 先进先出
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        JResult FIFO(FIFORequest request);
    }
}
